Repository navigation
Convert AWS HTML documentation to Markdown docstrings - #993
Merged
Merged
Conversation
kuhe
reviewed
Nov 27, 2026
| properly deserialize successful and error responses. | ||
| This operation has three possible return values: 1. A successful | ||
| response in the form of GreetingWithErrorsOutput 2. An InvalidGreeting | ||
| error. 3. A ComplexError error. Implementations must be able to |
Contributor
There was a problem hiding this comment.
it was more readable before in this case
kuhe
reviewed
Nov 27, 2026
| This example POST operation has no input and serializes a request | ||
| without a HTTP body. | ||
|
|
||
| These tests are to ensure we do not attach a body or related headers |
Contributor
There was a problem hiding this comment.
I think we should preserve and treat double linebreak as an intentional paragraph
kuhe
approved these changes
Nov 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue #, if available:
Description of changes:
The Python generator wrote AWS documentation into docstrings as raw HTML. This converts it to Markdown, without Pandoc, as asked on #981.
smithy_python._docs.html_to_markdownis a small converter on the stdlibHTMLParser. AWS docs use few tags:p,code,a,ul,li,b,i,noteandimportantcover nearly all of them.aws.api#service, like the Java generator. Other Smithy docs are CommonMark and stay as they are.-list items,Note:/Warning:sections fornote/important,fullnamedropped, and placeholders like<Region>kept as inline code. Text wraps at 72 columns and keeps code spans and list indents whole.On 6,000 sampled AWS documentation strings, 99% match Pandoc's text apart from line breaks, and the rest differ only in layout (like Pandoc's curly-quote handling). No content is lost.
The
featuresfixture now has HTML docs on the service andPutNote. The protocol test snapshots rewrap some plain-text docs that had hard line breaks, which matches the Java output.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.